// $ANTLR 3.4 C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g 2012-11-07 16:32:01
package PL.practica8;

import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;

@SuppressWarnings({"all", "warnings", "unchecked"})
public class ExpresionesLexer extends Lexer {
    public static final int EOF=-1;
    public static final int ABRIRPARENTESIS=4;
    public static final int ASIGNACION=5;
    public static final int ASTERISCO=6;
    public static final int BLANCO=7;
    public static final int CERRARPARENTESIS=8;
    public static final int COMENTARIO=9;
    public static final int DIGITO=10;
    public static final int ID=11;
    public static final int LETRA=12;
    public static final int MAS=13;
    public static final int MENOS=14;
    public static final int NUEVA_LINEA=15;
    public static final int NUMERO=16;
    public static final int SEPARADOR=17;
    public static final int SLASH=18;

    ArrayList <RecognitionException> errores = new ArrayList<RecognitionException>();

    public boolean listaVacia (){
        if (errores.isEmpty()){
          return true;
        }else
          return false;
    }

    public ArrayList getListaErrores(){return errores;}


    @Override
    public void reportError (RecognitionException e){
      System.err.println (getErrorMessage(e, getTokenNames()));
      errores.add(e);
    }





    // delegates
    // delegators
    public Lexer[] getDelegates() {
        return new Lexer[] {};
    }

    public ExpresionesLexer() {} 
    public ExpresionesLexer(CharStream input) {
        this(input, new RecognizerSharedState());
    }
    public ExpresionesLexer(CharStream input, RecognizerSharedState state) {
        super(input,state);
    }
    public String getGrammarFileName() { return "C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g"; }

    // $ANTLR start "DIGITO"
    public final void mDIGITO() throws RecognitionException {
        try {
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:34:16: ( '0' .. '9' )
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:
            {
            if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
                input.consume();
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;
            }


            }


        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "DIGITO"

    // $ANTLR start "LETRA"
    public final void mLETRA() throws RecognitionException {
        try {
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:35:16: ( ( 'A' .. 'Z' ) | ( 'a' .. 'z' ) | '_' )
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:
            {
            if ( (input.LA(1) >= 'A' && input.LA(1) <= 'Z')||input.LA(1)=='_'||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {
                input.consume();
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;
            }


            }


        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "LETRA"

    // $ANTLR start "NUEVA_LINEA"
    public final void mNUEVA_LINEA() throws RecognitionException {
        try {
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:36:22: ( '\\r\\n' )
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:36:24: '\\r\\n'
            {
            match("\r\n"); 



            }


        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "NUEVA_LINEA"

    // $ANTLR start "BLANCO"
    public final void mBLANCO() throws RecognitionException {
        try {
            int _type = BLANCO;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:40:9: ( ( ' ' | '\\t' | NUEVA_LINEA ) )
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:40:11: ( ' ' | '\\t' | NUEVA_LINEA )
            {
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:40:11: ( ' ' | '\\t' | NUEVA_LINEA )
            int alt1=3;
            switch ( input.LA(1) ) {
            case ' ':
                {
                alt1=1;
                }
                break;
            case '\t':
                {
                alt1=2;
                }
                break;
            case '\r':
                {
                alt1=3;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 1, 0, input);

                throw nvae;

            }

            switch (alt1) {
                case 1 :
                    // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:40:12: ' '
                    {
                    match(' '); 

                    }
                    break;
                case 2 :
                    // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:40:16: '\\t'
                    {
                    match('\t'); 

                    }
                    break;
                case 3 :
                    // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:40:21: NUEVA_LINEA
                    {
                    mNUEVA_LINEA(); 


                    }
                    break;

            }


            skip();

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "BLANCO"

    // $ANTLR start "COMENTARIO"
    public final void mCOMENTARIO() throws RecognitionException {
        try {
            int _type = COMENTARIO;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:41:13: ( '/*' ( options {greedy=false; } : . )* '*/' )
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:41:15: '/*' ( options {greedy=false; } : . )* '*/'
            {
            match("/*"); 



            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:41:20: ( options {greedy=false; } : . )*
            loop2:
            do {
                int alt2=2;
                int LA2_0 = input.LA(1);

                if ( (LA2_0=='*') ) {
                    int LA2_1 = input.LA(2);

                    if ( (LA2_1=='/') ) {
                        alt2=2;
                    }
                    else if ( ((LA2_1 >= '\u0000' && LA2_1 <= '.')||(LA2_1 >= '0' && LA2_1 <= '\uFFFF')) ) {
                        alt2=1;
                    }


                }
                else if ( ((LA2_0 >= '\u0000' && LA2_0 <= ')')||(LA2_0 >= '+' && LA2_0 <= '\uFFFF')) ) {
                    alt2=1;
                }


                switch (alt2) {
            	case 1 :
            	    // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:41:45: .
            	    {
            	    matchAny(); 

            	    }
            	    break;

            	default :
            	    break loop2;
                }
            } while (true);


            match("*/"); 



            skip();

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "COMENTARIO"

    // $ANTLR start "ID"
    public final void mID() throws RecognitionException {
        try {
            int _type = ID;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:45:4: ( LETRA ( LETRA | DIGITO )* )
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:45:6: LETRA ( LETRA | DIGITO )*
            {
            mLETRA(); 


            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:45:12: ( LETRA | DIGITO )*
            loop3:
            do {
                int alt3=2;
                int LA3_0 = input.LA(1);

                if ( ((LA3_0 >= '0' && LA3_0 <= '9')||(LA3_0 >= 'A' && LA3_0 <= 'Z')||LA3_0=='_'||(LA3_0 >= 'a' && LA3_0 <= 'z')) ) {
                    alt3=1;
                }


                switch (alt3) {
            	case 1 :
            	    // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:
            	    {
            	    if ( (input.LA(1) >= '0' && input.LA(1) <= '9')||(input.LA(1) >= 'A' && input.LA(1) <= 'Z')||input.LA(1)=='_'||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {
            	        input.consume();
            	    }
            	    else {
            	        MismatchedSetException mse = new MismatchedSetException(null,input);
            	        recover(mse);
            	        throw mse;
            	    }


            	    }
            	    break;

            	default :
            	    break loop3;
                }
            } while (true);


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "ID"

    // $ANTLR start "NUMERO"
    public final void mNUMERO() throws RecognitionException {
        try {
            int _type = NUMERO;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:46:7: ( ( DIGITO )+ )
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:46:9: ( DIGITO )+
            {
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:46:9: ( DIGITO )+
            int cnt4=0;
            loop4:
            do {
                int alt4=2;
                int LA4_0 = input.LA(1);

                if ( ((LA4_0 >= '0' && LA4_0 <= '9')) ) {
                    alt4=1;
                }


                switch (alt4) {
            	case 1 :
            	    // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:
            	    {
            	    if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
            	        input.consume();
            	    }
            	    else {
            	        MismatchedSetException mse = new MismatchedSetException(null,input);
            	        recover(mse);
            	        throw mse;
            	    }


            	    }
            	    break;

            	default :
            	    if ( cnt4 >= 1 ) break loop4;
                        EarlyExitException eee =
                            new EarlyExitException(4, input);
                        throw eee;
                }
                cnt4++;
            } while (true);


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "NUMERO"

    // $ANTLR start "MAS"
    public final void mMAS() throws RecognitionException {
        try {
            int _type = MAS;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:47:5: ( '+' )
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:47:7: '+'
            {
            match('+'); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "MAS"

    // $ANTLR start "MENOS"
    public final void mMENOS() throws RecognitionException {
        try {
            int _type = MENOS;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:48:7: ( '-' )
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:48:9: '-'
            {
            match('-'); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "MENOS"

    // $ANTLR start "ASTERISCO"
    public final void mASTERISCO() throws RecognitionException {
        try {
            int _type = ASTERISCO;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:49:11: ( '*' )
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:49:13: '*'
            {
            match('*'); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "ASTERISCO"

    // $ANTLR start "SLASH"
    public final void mSLASH() throws RecognitionException {
        try {
            int _type = SLASH;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:50:7: ( '/' )
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:50:9: '/'
            {
            match('/'); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "SLASH"

    // $ANTLR start "ASIGNACION"
    public final void mASIGNACION() throws RecognitionException {
        try {
            int _type = ASIGNACION;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:52:12: ( ':=' )
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:52:14: ':='
            {
            match(":="); 



            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "ASIGNACION"

    // $ANTLR start "ABRIRPARENTESIS"
    public final void mABRIRPARENTESIS() throws RecognitionException {
        try {
            int _type = ABRIRPARENTESIS;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:54:17: ( '(' )
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:54:19: '('
            {
            match('('); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "ABRIRPARENTESIS"

    // $ANTLR start "CERRARPARENTESIS"
    public final void mCERRARPARENTESIS() throws RecognitionException {
        try {
            int _type = CERRARPARENTESIS;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:55:18: ( ')' )
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:55:20: ')'
            {
            match(')'); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "CERRARPARENTESIS"

    // $ANTLR start "SEPARADOR"
    public final void mSEPARADOR() throws RecognitionException {
        try {
            int _type = SEPARADOR;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:56:11: ( ';' )
            // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:56:13: ';'
            {
            match(';'); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "SEPARADOR"

    public void mTokens() throws RecognitionException {
        // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:1:8: ( BLANCO | COMENTARIO | ID | NUMERO | MAS | MENOS | ASTERISCO | SLASH | ASIGNACION | ABRIRPARENTESIS | CERRARPARENTESIS | SEPARADOR )
        int alt5=12;
        switch ( input.LA(1) ) {
        case '\t':
        case '\r':
        case ' ':
            {
            alt5=1;
            }
            break;
        case '/':
            {
            int LA5_2 = input.LA(2);

            if ( (LA5_2=='*') ) {
                alt5=2;
            }
            else {
                alt5=8;
            }
            }
            break;
        case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':
        case 'G':
        case 'H':
        case 'I':
        case 'J':
        case 'K':
        case 'L':
        case 'M':
        case 'N':
        case 'O':
        case 'P':
        case 'Q':
        case 'R':
        case 'S':
        case 'T':
        case 'U':
        case 'V':
        case 'W':
        case 'X':
        case 'Y':
        case 'Z':
        case '_':
        case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':
        case 'g':
        case 'h':
        case 'i':
        case 'j':
        case 'k':
        case 'l':
        case 'm':
        case 'n':
        case 'o':
        case 'p':
        case 'q':
        case 'r':
        case 's':
        case 't':
        case 'u':
        case 'v':
        case 'w':
        case 'x':
        case 'y':
        case 'z':
            {
            alt5=3;
            }
            break;
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':
            {
            alt5=4;
            }
            break;
        case '+':
            {
            alt5=5;
            }
            break;
        case '-':
            {
            alt5=6;
            }
            break;
        case '*':
            {
            alt5=7;
            }
            break;
        case ':':
            {
            alt5=9;
            }
            break;
        case '(':
            {
            alt5=10;
            }
            break;
        case ')':
            {
            alt5=11;
            }
            break;
        case ';':
            {
            alt5=12;
            }
            break;
        default:
            NoViableAltException nvae =
                new NoViableAltException("", 5, 0, input);

            throw nvae;

        }

        switch (alt5) {
            case 1 :
                // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:1:10: BLANCO
                {
                mBLANCO(); 


                }
                break;
            case 2 :
                // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:1:17: COMENTARIO
                {
                mCOMENTARIO(); 


                }
                break;
            case 3 :
                // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:1:28: ID
                {
                mID(); 


                }
                break;
            case 4 :
                // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:1:31: NUMERO
                {
                mNUMERO(); 


                }
                break;
            case 5 :
                // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:1:38: MAS
                {
                mMAS(); 


                }
                break;
            case 6 :
                // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:1:42: MENOS
                {
                mMENOS(); 


                }
                break;
            case 7 :
                // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:1:48: ASTERISCO
                {
                mASTERISCO(); 


                }
                break;
            case 8 :
                // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:1:58: SLASH
                {
                mSLASH(); 


                }
                break;
            case 9 :
                // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:1:64: ASIGNACION
                {
                mASIGNACION(); 


                }
                break;
            case 10 :
                // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:1:75: ABRIRPARENTESIS
                {
                mABRIRPARENTESIS(); 


                }
                break;
            case 11 :
                // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:1:91: CERRARPARENTESIS
                {
                mCERRARPARENTESIS(); 


                }
                break;
            case 12 :
                // C:\\Users\\Jose\\workspace\\practica8\\src\\main\\java\\PL\\practica8\\ExpresionesLexer.g:1:108: SEPARADOR
                {
                mSEPARADOR(); 


                }
                break;

        }

    }


 

}